package org.hutb.community.service;

import org.hutb.community.dao.AlphaDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @ClassName AlphaService
 * @Description
 *
 * 测试Spring对 bean的管理
 *   -初始化
 *   -销毁等
 *
 * @Author xubo
 * @Date 2021/11/19 1:04
 */

@Service
public class AlphaService {

    @Autowired
    private AlphaDao alphaDao;

    public String find(){
        return alphaDao.select();
    }

//    public AlphaService(){
//        System.out.println("执行构造器,实例化AlphaService实例");
//    }

//    @PostConstruct
//    public void init(){
//
//        System.out.println("初始化AlphaService");
//
//        System.out.println("初始化AlphaService！！！！！！");
//
//    }
//
//    @PreDestroy
//    public void destroy(){
//
//        System.out.println("销毁AlphaService");
//
//        System.out.println("销毁AlphaService！！！！！！！");
//
//    }

}
